; hello.asm 

; nasm -f elf64 -g -F dwarf hello.asm && ld hello.o && ./a.out

section .data 
    msg db  "hello world",10, 0

section .bss 

section .text 
    global main 

main:
    mov     rax,    1       ; 1 = write
    mov     rdi,    1       ; 1 = to stdout
    mov     rsi,    msg     ; string to display
    mov     rdx,    13      ; length of string
    syscall

    mov     rax,    60      ; 60 = sys_exit
    mov     rdi,    0       ; 0 = success exit code
    syscall